using System.Text;

namespace Storage.Client
{
	public interface ISerializer<in T>
	{
		byte[] Serialize(T item);
	}

	public class BytesSerializer : ISerializer<byte[]>
	{
		public byte[] Serialize(byte[] item)
		{
			return item;
		}
	}

	public class StringSerializer : ISerializer<string>
	{
		public byte[] Serialize(string item)
		{
			return Encoding.UTF8.GetBytes(item);
		}
	}
}